<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css"></style>

</head>
<body>
    <h1>JS 的字串</h1>
    <hr>

    <script>
        var a = '12345,';
        var b = '上山打老虎';
        var c = a + b;

        console.log(c);

        // 单双引号
        var h = '呵呵哒';
        var str1 = 'hello, \ni xuan you!h';
        var str2 = "hello, \ni xuan you!h";

        console.log(str1);
        console.log(str2);

        // ES6 ``  反引号
        var msg = `
            <img src="./1.jpg" alt="pic1" width="200">
            <p>老云说:"这张图片真'好看'."</p>
            <p>老李说:"哪呢,我怎么没看到"</p>
        `;

        document.write(msg);

        // 1 + 2 = 3
        var x = 99, y = 2;
        console.log(`${x} + ${y} = ${x + y}`);

    </script>

</body>
</html>




